package cn.com.blueInfo.bpm.person.enums;

import cn.com.blueInfo.bpm.common.enums.BaseEnum;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 职务状态
 * @author suxch
 * @since 2025-08-28 22:06:38
 */
@Getter
@AllArgsConstructor
public enum UserIdentityPrimaryStatus implements BaseEnum<Integer> {

    /** 职务状态-主职 */
    FULL_TIME(1, "主职"),
    /** 职务状态-兼职 */
    PART_TIME(2, "兼职");

    @EnumValue
    private final Integer code;

    @JsonValue
    private final String desc;

    public static UserIdentityPrimaryStatus getByCode(Integer code) {
        return BaseEnum.getByCode(UserIdentityPrimaryStatus.class, code);
    }

    @JsonCreator
    public static UserIdentityPrimaryStatus getByName(String name) {
        return BaseEnum.getByName(name, UserIdentityPrimaryStatus.class);
    }

}
